package com.hsjk.szwj.module.train.dal.mysql.course;

import com.hsjk.szwj.framework.mybatis.core.mapper.BaseMapperX;
import com.hsjk.szwj.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.hsjk.szwj.module.train.dal.dataobject.course.CourseCatalogDO;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/04 01:24
 **/
@Mapper
public interface ICourseCatalogMapper extends BaseMapperX<CourseCatalogDO> {
    default List<CourseCatalogDO> getCourseCatalogListByCourseId(Long courseId) {
        return selectList(new LambdaQueryWrapperX<CourseCatalogDO>()
                .eq(CourseCatalogDO::getCourseId, courseId)
                .orderByAsc(CourseCatalogDO::getSortNo));
    }
}
